package common;

import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReentrantReadWriteLock;
import java.util.regex.Pattern;

import server.SubServer;

public class testt implements Runnable {

	private String a ;
	int id;
	String b;
    
	
	public testt(){
		
	}

	// private final Lock write = readWriteLock.writeLock();


	public static void main(String[] args) throws InterruptedException {
        int playerNumber = 0;
		testt t1=new testt();
		
		while(playerNumber<2){
			
			Threadt b=new Threadt(t1,Integer.toString(playerNumber));
			b.setName(Integer.toString(playerNumber));
			b.start();
			playerNumber++;
		}
	
	}


	public void print(String a) throws InterruptedException {

		    b=a;
	        for(int i=0;i<10;i++)
			System.out.println(a);
	        System.out.println(b+"()()()()()");
			System.out.print("****************"+a+"*******************");
			//wait();
	        for(int i=0;i<10;i++)
			System.out.print(a);
		

		//		System.out.println(Thread.currentThread().getName());
		//			notifyAll();
		//		

	}

	@Override
	public void run() {
		// TODO Auto-generated method stub
		try {
			print(a);
		} catch (InterruptedException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
}


class Threadt extends Thread{
	String str;
	testt t1;
	public Threadt(testt t1,String str){
		this.str=str;
		this.t1=t1;
	}
	public void run(){
		try {
			t1.print(str);
		} catch (InterruptedException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
}
